Skip to content

docs: add an FDv2 example app for the Flutter SDK#316

Merged
kinyoklion merged 3 commits into
mainfrom
rlamb/sdk-2188/fdv2-example-app
Jun 29, 2026
Merged

docs: add an FDv2 example app for the Flutter SDK#316
kinyoklion merged 3 commits into
mainfrom
rlamb/sdk-2188/fdv2-example-app

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Jun 25, 2026

Copy link
Copy Markdown
Member

Stacked on #314 (the Flutter FDv2 exposure). A runnable example app demonstrating FDv2 in the Flutter SDK.

What it shows

  • Enabling the data system via LDConfig(..., dataSystem: DataSystemConfig()).
  • Switching connection modes at runtime with LDClient.setConnectionMode(...).

Registered in the melos workspace (packages/flutter_client_sdk/example_fdv2). Modeled on js-core's react-native example-fdv2.

flutter analyze clean on the example lib/.


Note

Low Risk
Example-only and documentation; no changes to the published SDK library code paths.

Overview
Adds packages/flutter_client_sdk/example_fdv2, a runnable manual-test app for the Flutter SDK’s FDv2 data path, and registers it in melos.yaml so melos bootstrap links the local SDK.

The demo UI wires LDConfig with dataSystem: DataSystemConfig() (FDv2 opt-in), CredentialSource.fromEnvironment(), and a sample user context. It surfaces live dataSourceStatusChanges, flagChanges / allFlags(), runtime setConnectionMode (automatic, streaming, polling, background, offline), and identify with result feedback. A README documents credentials via --dart-define and expected manual checks.

Platform scaffolding (Android/iOS/web/desktop) is standard Flutter template output; the meaningful product change is the example app plus melos membership, not SDK internals.

Reviewed by Cursor Bugbot for commit f9be9de. Bugbot is set up for automated code reviews on this repo. Configure here.

@kinyoklion kinyoklion force-pushed the rlamb/sdk-2188/expose-fdv2-data-system branch from 0a9b5dd to dd322f6 Compare June 25, 2026 22:59
@kinyoklion kinyoklion force-pushed the rlamb/sdk-2188/fdv2-example-app branch 4 times, most recently from 8a6c2dc to d5c9834 Compare June 25, 2026 23:11
Base automatically changed from rlamb/sdk-2188/expose-fdv2-data-system to main June 29, 2026 16:07
A runnable example demonstrating FDv2 in the Flutter SDK: enabling the
data system via DataSystemConfig on LDConfig and switching connection
modes with setConnectionMode. Registered in the melos workspace.

Modeled on the js-core react-native example-fdv2.
@kinyoklion kinyoklion force-pushed the rlamb/sdk-2188/fdv2-example-app branch from d5c9834 to 957001c Compare June 29, 2026 16:09
@kinyoklion kinyoklion marked this pull request as ready for review June 29, 2026 16:36
@kinyoklion kinyoklion requested a review from a team as a code owner June 29, 2026 16:36

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f0b7da3. Configure here.

Comment thread packages/flutter_client_sdk/example_fdv2/lib/main.dart Outdated
- Add com.apple.security.network.client to the macOS entitlements so
  sandboxed builds can reach LaunchDarkly.
- Declare the INTERNET permission in the main Android manifest so release
  builds (which merge only that manifest) have network access.
- Only update the displayed active context when identify completes; a
  superseded or errored identify no longer relabels the context.
@kinyoklion kinyoklion merged commit f01ba42 into main Jun 29, 2026
7 checks passed
@kinyoklion kinyoklion deleted the rlamb/sdk-2188/fdv2-example-app branch June 29, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants